<% if changeset.commits.any? %>
  <p><%= changeset.commits.size %> commits by <%= pluralize changeset.authors.size, "author" %>.</p>

  <table class="table">
    <tbody>
    <% changeset.commits.each do |commit| %>
      <tr>
        <td>
          <% if author = commit.author %>
            <%= github_user_avatar(author) %>
          <% end %>
        </td>
        <td>
          <% name = commit.author_name.presence || "Unknown" %>
          <% url = commit.author&.url %>
          <%= link_to_if(url, name, url) %></td>
        <td><%= link_to commit.summary, commit.url %></td>
        <td align="right"><code><%= link_to commit.short_sha, commit.url %></code></td>
      </tr>
    <% end %>
    </tbody>
  </table>
<% else %>
  <p>There were no new commits in this deploy.</p>
<% end %>
